﻿using BaseAPI;
using MemorySiteServer.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace MemorySiteServer.ViewModels.RoleViewModels
{
    public class RoleGetOneRequest : BaseGetOneViewModel<Role>
    {
        public override IQueryable<Role> QueryFun(IQueryable<Role> queryable)
        {
            //列表已经获取其他信息，这里只需要返回权限列表即可
            return queryable.Select(x => new Role() { RolePermissions = x.RolePermissions });
        }
    }
}
